Try again to make gdk_pixbuf_get_file_info work for tiff images
authorMatthias Clasen <matthiasc@src.gnome.org>
Thu, 5 Jul 2007 20:16:59 +0000 (20:16 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 5 Jul 2007 20:16:59 +0000 (20:16 +0000)
svn path=/trunk/; revision=18384

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-loader.c
gdk-pixbuf/io-tiff.c

index 835f197e267637df7ea584ce9431d8aa754308a1..d8e03e22da9c88566265c3a8e59cf6a2b6e75747 100644 (file)
@@ -1,3 +1,9 @@
+2007-07-05  Matthias Clasen  <mclasen@redhat.com>
+
+       * io-tiff.c: Revert the last change, it was wrong
+       * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Redo the last
+       change in a different way.
+
 2007-07-04  Tor Lillqvist  <tml@novell.com>
 
        * pixops/Makefile.am (timescale_LDADD): Use GDK_PIXBUF_DEP_LIBS
index 130608fb3e7d29e32c926c7b1e6aad68f6150d80..981874c08558d931c88859dbcd11e7f994e2ea4d 100644 (file)
@@ -723,8 +723,12 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
                         GError *tmp = NULL;
                         if (!priv->image_module->stop_load (priv->context, &tmp) || tmp)
                                 {
-                                        gdk_pixbuf_loader_ensure_error (loader, &tmp);
-                                       g_propagate_error (error, tmp);
+                                       /* don't call gdk_pixbuf_loader_ensure_error()
+                                        * here, since we might not get an error in the
+                                        * gdk_pixbuf_get_file_info() case
+                                        */
+                                       if (tmp)
+                                               g_propagate_error (error, tmp);
                                         retval = FALSE;
                                 }
                 }
index 9e521022dcd723dd8cfdc3189f41edee19883b15..a9863e6cffb2fd8eb2a36c8896170e63fa51d3f6 100644 (file)
@@ -199,13 +199,8 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
                 gint h = height;
                (* context->size_func) (&w, &h, context->user_data);
                 
-                if (w == 0 || h == 0) {
-                    g_set_error (error,
-                                 GDK_PIXBUF_ERROR,
-                                 GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
-                                 _("Width or height of TIFF image is zero"));
+                if (w == 0 || h == 0)
                     return NULL;
-                }
         }
 
         pixels = g_try_malloc (bytes);